#ifndef RAMROD_PROJECT_FINAL_CAR_H
#define RAMROD_PROJECT_FINAL_CAR_H

#include "position.h"
#include "direction.h"
#include <vector>
#include <queue>
#include "turn.h"

class Node;
class Map;

class Car {

private:
	void makeTurn(Direction &dir);
	void gas();
	void brakes();
	void move();
	int checkDistanceToTurn();
	int currSpeed;
	int maxSpeed;
	int turnSpeed;
	int accelRate;
	bool slowForTurn;
	Position* destination;
	std::queue<turn> route;
public:
	virtual ~Car();
	virtual void TakeTurn();
	Car();
	Car(Position *givenPosition, Position *dest);
	void driveTo(Position *pos);
	void driveTo(int xPosition, int yPosition);
	bool withinRadius(Position *pos1, Position *pos2, int radius);
	Node* nearestNode(int xPosition, int yPosition);
	std::vector<Node*> findShortestPath(Node* startNode, Node* endNode);

	Position *myPosition;
	Direction myDirection;
	Map* map;
};

#endif // RAMROD_PROJECT_FINAL_CAR_H
